import {
	http
} from '../httpIndex.js'
export default {
	// 午休登记 /app/duty/createOrUpdatePatrolInfo
	createOrUpdatePatrolInfoMoon(classId, classPatrolJson, patrolType, describeTxt, patrolImg, patrolStatus, createBy,
		isInformCharge) {
		return http.post("app/duty/createOrUpdatePatrolInfo", {
			classId: classId,
			classPatrolJson: classPatrolJson,
			patrolType: patrolType,
			describeTxt: describeTxt,
			patrolImg: patrolImg,
			patrolStatus: patrolStatus,
			createBy: createBy,
			isInformCharge: isInformCharge
		})
	},
	// /app/duty/createOrUpdatePatrolInfo 入校查询
	createOrUpdatePatrolInfoSch(classId, studentNo, patrolType, describeTxt, patrolImg, dvType, createBy,
		isInformCharge) {
		return http.post("app/duty/createOrUpdatePatrolInfo", {
			classId: classId,
			studentNo: studentNo,
			patrolType: patrolType,
			describeTxt: describeTxt,
			patrolImg: patrolImg,
			dvType: dvType,
			createBy: createBy,
			isInformCharge: isInformCharge
		})
	},
	// 课堂巡查 /app/duty/createOrUpdatePatrolInfo 
	createOrUpdatePatrolInfoClass(patrolType, classId, classPatrolJson, patrolStatus, hygienicStatus,isInformCharge,describeTxt, patrolImg, createBy) {
		return http.post("app/duty/createOrUpdatePatrolInfo", {
			classId: classId,
			classPatrolJson: classPatrolJson,
			patrolType: patrolType,
			describeTxt: describeTxt,
			patrolImg: patrolImg,
			createBy: createBy,
			isInformCharge: isInformCharge,
			patrolStatus: patrolStatus,
			hygienicStatus: hygienicStatus
		})
	},
	// 课间违纪  patrolType：6
	createOrUpdatePatrolInfoAfter(classId, dvType, patrolType, describeTxt, patrolImg, studentNo, createBy,
		isInformCharge) {
		return http.post("app/duty/createOrUpdatePatrolInfo", {
			classId: classId,
			dvType: dvType,
			patrolType: patrolType,
			describeTxt: describeTxt,
			patrolImg: patrolImg,
			studentNo: studentNo,
			createBy: createBy,
			isInformCharge: isInformCharge
		})
	},
	// 宿舍查询
	createOrUpdatePatrolInfoDor(dormitoryId, patrolStatus, patrolType, describeTxt, patrolImg, createBy,
		isInformCharge) {
		return http.post("app/duty/createOrUpdatePatrolInfo", {
			dormitoryId: dormitoryId,
			patrolStatus: patrolStatus,
			patrolType: patrolType,
			describeTxt: describeTxt,
			patrolImg: patrolImg,
			createBy: createBy,
			isInformCharge: isInformCharge
		})
	},
	// 全部修改，id不同
	createOrUpdatePatroInAll(id, classId, dormitoryId, studentNo, classPatrolJson, patrolType, describeTxt, patrolImg,
		patrolStatus, dvType, createBy) {
		return http.post("app/duty/createOrUpdatePatrolInfo", {
			id: id,
			classId: classId,
			dormitoryId: dormitoryId,
			studentNo: studentNo,
			classPatrolJson,
			patrolType: patrolType,
			describeTxt: describeTxt,
			patrolImg: patrolImg,
			patrolStatus: patrolStatus,
			dvType: dvType,
			createBy: createBy
		})
	},
	// 宿舍卫生详情 /app/duty/getSchoolPatrolDetails
	getSchoolPatrolDetails(id) {
		return http.get(`app/duty/getSchoolPatrolDetails?id=${id}`)
	},
	// 获取违纪列表 app/duty/getSchoolPatrolPageList
	//  1:宿舍巡查 2:入校早操巡查 3:课堂巡查 4:午休巡查 5:晚自习巡查'
	getSchoolPatrolPageList(patrolType, pageSize, pageNum, patrolTime) {
		return http.post("app/duty/getSchoolPatrolPageList", {
			patrolType: patrolType,
			pageSize: pageSize,
			pageNum: pageNum,
			patrolTime: patrolTime
		})
	},
	// 删除巡查记录 /app/duty/deletePatrolInfo
	deletePatrolInfo(id) {
		return http.get(`app/duty/deletePatrolInfo?id=${id}`)
	},
	// 查询部门 班级 /app/duty/getClassListByDept?dutyDept=2
	getClassListByDept(dutyDept) {
		return http.get(`app/duty/getClassListByDept?dutyDept=${dutyDept}`)
	},
	// 报修列表 /app/Repair/getAllRepairByCreatedBy?username
	getAllRepairByCreatedBy(username) {
		return http.get(`app/Repair/getAllRepairByCreatedBy?username=${username}`)
	},
	// 宿舍模糊搜索 app/duty/getDormitoryNameByName
	getDormitoryNameByName(name) {
		return http.get(`app/duty/getDormitoryNameByName?name=${name}`)
	}
}
